import request from '@/utils/request'

// SKU列表接口
// GET /admin/product/list/{page}/{limit}
export function productList(page,limit){
    return request({
        url:`/admin/product/list/${page}/${limit}`,
        method:'GET'
    })
}

//商品上架接口
// GET /admin/product/onSale/{skuId}
export function OnSale(skuId){
    return request({
        url:`/admin/product/onSale/${skuId}`,
        method:'GET'
    })
}

// 商品下架接口
// GET /admin/product/cancelSale/{skuId}
export function CancelSale(skuId){
    return request({
        url:`/admin/product/cancelSale/${skuId}`,
        method:'GET'
    })
}

// 获取sku列表
// GET /admin/product/getSkuById/{skuId}
export function getSkuById(skuId){
    return request({
        url:`/admin/product/getSkuById/${skuId}`,
        method:'GET'
    })
}

// 删除sku
// DELETE /admin/product/deleteSku/{skuId}
export function deleteSku(skuId){
    return request({
        url:`/admin/product/deleteSku/${skuId}`,
        method:'DELETE'
    })
}

